<script src="includes/js/tiny_mce/tiny_mce.js" type="text/javascript"></script>
<script src="includes/js/editor.js" type="text/javascript"></script>
<div class="wrap">
<table width="100%" height="100%" cellpadding="0" cellspacing="0">
	<tr>
	<td width="54px" height="43px" class="fr_lefttop"></td>
	<td height="43px" class="fr_centertop" ></td>
	<td width="48px" height="43px" class="fr_righttop"></td>
	</tr>
	<tr>
	<td width="54px" class="fr_leftmiddle" >&nbsp;</td>
	<td class="fr_centermiddle">
	<div id='ajaxResponse' class="ajaxResponse"></div>
	<h2>{t}Create New Page{/t}</h2>
	<form name="newpage" id="newpage"  enctype="multipart/form-data" method="post" action="?mod={$smarty.get.mod}&sub1=page">
		<input type="hidden" id="act" name="act" value="newpage"/>
		<input type="hidden" id="id" name="id" value=""/>
		<input type="hidden" id="type" name="type" value="">
		<table width="100%">
		<tr valign="top">
			<td width="60%">
				<p>
				<label for="page_name">{t}Title:{/t}</label><br />
				<input name="page_name" id="page_name" type="text" value="" size="90px" />
				</p>
                <p>
                <label for="product_image">{t}Gallery image:{/t}</label><br />
					<input type="file" size="50" name="page_img" id="page_img" value="" AUTOCOMPLETE='OFF' readonly="readonly" />
            	</p>
           
                 <p>
                	<label for="page_content">{t}Page Content (show in home):{/t}</label><br />
                    <div>
                        <textarea id="short_desciption" name="short_desciption" rows="15" cols="5" style="width: 100%"></textarea>
                    </div>
                </p>
                <p>
				<label for="page_content">{t}Page Content:{/t}</label><br />
				<div>
					<textarea id="page_content" name="page_content" rows="15" cols="10" style="width: 100%"></textarea>
				</div>
                </p>
				<p class="submit" align = "right">
					<input type="submit" name="button" value="{t escape=no}Save And Continue Editing &raquo;{/t}" 
					onclick="$('type').value='ajax';"/>
					<input id="submit" type="submit" name="submit" value="{t escape=no}Save Page &raquo;{/t}" 
					onclick="$('type').value='';"/>
				</p>
				
			</td>
			<td class="tblColRight" width="40%" nowrap>
				<div class="box">
					<h3>{t}Page Status{/t}</h3>
					<div class="box-content">
						<label for="page_status_publish" class="selectit">
							<input id="page_status_publish" name="page_status" type="radio" value="publish"  checked="checked" /> 
							{t}Published{/t}
						</label>
						<label for="page_status_draft" class="selectit">
							<input id="page_status_draft" name="page_status" type="radio" value="draft" /> 
							{t}Draft{/t}
						</label>
						<label for="page_status_private" class="selectit">
							<input id="page_status_private" name="page_status" type="radio" value="private"/> 
							{t}Private{/t}
						</label>
					</div>
				</div>
				<div class="box">
					<h3>{t}Page Parent{/t}</h3>
					<div class="box-content">
						<select name='page_parent' id='page_parent'>
		  					<option value='0'>{t}None{/t}</option>
		  					{foreach name=page from=$PAGES item=item}
							<option id='page_parent-{$item->page_id}' value='{$item->page_id}'>
								{$item->page_name}
							</option>
							{/foreach}
						</select>
					</div> 
				</div>
				<div class="box">
					<h3>{t}Page Author{/t}</h3>
					<div class="box-content">
						<select name='page_author' id='page_author'>
		  					{*<option value='0'>{t}None{/t}</option>*}
		  					{foreach name=user from=$USERS item=item}
		  					{if $smarty.session.u_id eq $item->ID}
		  					<option selected id='page_author-{$item->ID}' value='{$item->ID}'>
		  					{else}
							<option id='page_author-{$item->ID}' value='{$item->ID}'>
							{/if}
								{$item->user_login}
							</option>
							{/foreach}
						</select>
					</div> 
				</div>
				<div class="box">
					<h3>{t}Page Header Position{/t}</h3>
					<div class="box-content">
						<label for="hpNone" class="selectit">
							<input id="hpNone" checked="checked" name="page_type" type="radio" value=""/> 
							{t}None{/t}
						</label>
						<label for="hpHome" class="selectit">
							<input id="hpHome" name="page_type" type="radio" value="1"/> 
							{t}Home{/t}
						</label>
						<label for="hpAbout" class="selectit">
							<input id="hpAbout" name="page_type" type="radio" value="2"/> 
							{t}About Us{/t}
						</label>
						<label for="hpProduct" class="selectit">
							<input id="hpProduct" name="page_type" type="radio" value="3"/> 
							{t}Product{/t}
						</label>
						<label for="hpService" class="selectit">
							<input id="hpService" name="page_type" type="radio" value="4"/> 
							{t}Service{/t}
						</label>
                        <label for="hpWelcome" class="selectit">
							<input id="hpWelcome" name="page_type" type="radio" value="5"/> 
							{t}Welcome{/t}
						</label>
                        <label for="hpWho" class="selectit">
							<input id="hpWho" name="page_type" type="radio" value="6"/> 
							{t}who we are{/t}
						</label>
                        <label for="hpContact" class="selectit">
							<input id="hpContact" name="page_type" type="radio" value="7"/> 
							{t}Contact{/t}
						</label>
					</div> 
				</div>
				<div class="box">
					<h3>{t}Other{/t}</h3>
					<div class="box-content">
						<label for="quicklink" class="selectit">
							<input id="quicklink" name="quicklink" type="checkbox" value="1"/> 
							{t}Quick link{/t}
						</label>
					</div> 
				</div>
			</td>
		</tr>
		</table>
	</form>
	</td>
	<td width="48px" class="fr_rightmiddle"></td>
	</tr>
	<tr>
	<td width="54px" height="60px" class="fr_leftbot" ></td>
	<td height="60px" class="fr_centerbot"></td>
	<td width="48px" height="60px" class="fr_rightbot" ></td>
	</tr>
</table>
</div>
